#ifndef EJEFFECTDELEGATE_H
#define EJEFFECTDELEGATE_H

#include <QItemDelegate>

class EJEffectDelegate : public QItemDelegate
{
    Q_OBJECT
public:

    EJEffectDelegate(const QStringList items = QStringList(), QObject *parent = nullptr);

    QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;

    void setEditorData(QWidget *editor, const QModelIndex &index) const;

    void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;

    void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;

    void setItems(const QStringList items){m_items = items;}

    QStringList &getItems(){return m_items;}

private:
    QStringList m_items;

};


#endif // EJEFFECTDELEGATE_H
